package com.prs.crm.action.project;

import org.apache.struts2.convention.annotation.Action;
import org.courser.struts.BaseAction;
import org.courser.ui.PaginationSupport;

import com.prs.crm.domain.project.Project;
import com.prs.crm.domain.project.Task;
import com.prs.crm.service.project.TaskService;

public class ProjectTaskAction extends BaseAction{

	private static final long serialVersionUID = 1L;
	
	private TaskService taskService;
	
	private PaginationSupport pagination;
	
	private Task task;
	
	private Project project;
	
	public void setTaskService(TaskService taskService) {
		this.taskService = taskService;
	}

	public TaskService getTaskService() {
		return taskService;
	}

	public void setPagination(PaginationSupport pagination) {
		this.pagination = pagination;
	}

	public PaginationSupport getPagination() {
		return pagination;
	}

	public void setTask(Task task) {
		this.task = task;
	}

	public Task getTask() {
		return task;
	}
	
	public void setProject(Project project) {
		this.project = project;
	}

	public Project getProject() {
		return project;
	}


	@Action("projectTask")
	public String projectTask()
	{
		this.setTask(this.getTaskService().findRootTask(project));
		return SUCCESS;
	}
	
	@Action("projectTaskTree")
	public String projectTaskTree()
	{
		return SUCCESS;
	}



	
}
